import { createRouter, createWebHashHistory } from 'vue-router'

// import Home from '@/views/Home.vue'

// const routes = [
//   {
//     path: '/',
//     name: 'Home',
//     component: Home
//   },
//   {
//     path: '/about',
//     name: 'About',

//     component: () =>
//       import('../views/About.vue')
//   }
// ]

const Layout = () => import('@/views/Layout')
const Home = () => import('@/views/home/index')

const Login = () => import('@/views/login/index')

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      { path: '/', component: Home }
    ]
  },
  { path: '/login', component: Login }
]

const router = createRouter({
  // history: createWebHistory(process.env.BASE_URL),
  history: createWebHashHistory(),
  routes
})

export default router
